import entity.Person;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class demo {
    public static void main(String[] args) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
//        Class clz = Process.class;
//
//        System.out.println(clz.getName());
//
//
//        int modifiers = clz.getModifiers();

        Class<Person> clz = Person.class;

        Person person = clz.newInstance();
        Method setName = clz.getDeclaredMethod("setName", String.class);

        setName.invoke(person,"123");



    }
}
